Release 10.1A: OpenEdge Development:
Progress Dynamics Administration


Mapping lookup fields to SDO fields through viewer widgets

For the CustomerCodeLookup example created on customer_obj, you can fix the redundancy for the user created by linking the lookup fields directly to the SDO by permanently hiding the customer_name fill-in object used to map the lookup display field to the corresponding SDO field. However, you might prefer to map lookup fields through separate viewer widgets mapped to the SDO.

To map the fields from the tutorial CustomerCodeLookup to SDO fields through viewer widgets:

  1. Ensure that you have created a join from art_order to arm_customer in the art_order SDO (artorfullo) and added the following fields for the lookup from arm_customer to the SDO:
  2. After you have saved the updated SDO, open the art_order viewer (artorviewv) in the AppBuilder.
  3. Add a new fill-in widget, fiCustCode, to the viewer, formatted to display arm_customer.customer_code.
  4. Note: This example assumes that you have already added the fiCustBalance widget as part of creating CustomerCodeLookup in the tutorial. For more information, see OpenEdge Development: Progress Dynamics Getting Started .

  5. Right-click on the CustomerCodeLookup and choose Instance Properties from the pop-up menu. This displays the SmartDataField Maintenance (Instance Properties) window.
  6. In the query field browser, select the row for arm_customer.customer_code and type the following column values:
    • Link fieldYES.
    • Linked widgetfiCustCode.
    • This is SmartDataField Maintenance (Instance Properties) as it appears after you have set these column values:

      Note: The corresponding column values for the arm_customer.customer_balance row have already been set from the tutorial.

  7. Choose the Map Fields tab. The left selection list on this tab lists all the fields in the data source (artorfullo SDO), and the right selection list lists the linked viewer fields (fiCustBalance and fiCustCode) for the lookup query.
  8. Map these viewer fields to the corresponding SDO fields:
    1. Select the arm_customer.customer_balance field in the left selection list and the fiCustBalance field in the right selection list. The Map button now becomes enabled, as shown:
    2. Choose the Map button. The two selected fields disappear from the selection lists and appear in the Mapped fields editor.
    3. Repeat Step a and Step b for the arm_customer.customer_code field in the left selection list and the fiCustCode field in the right selection list.
  9. Map the Displayed field for the lookup:
    1. Select the arm_customer.customer_name field from the left selection list and <Displayed Field> from the right selection list.
    2. Choose the Map button.
    3. The entire field mapping for the lookup appears in the Mapped field editor, as shown:

  10. Save the instance properties to complete the dynamic lookup field mapping.

The field redundancy that the first mapping option creates for this example (see the "Linking lookup fields directly to SDO fields on the viewer" section) does not occur using this option. The Map Fields tab allows you to specify the mapping of the lookup Displayed field to the corresponding SDO field without the need for a linked viewer widget that would otherwise create a redundant field on the viewer mapped to the SDO that displays the same value. Although this mapping option requires more steps to set up, it has the flexibility to accommodate field mappings for any lookup, no matter how it is defined.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095